package com.ljq.collectionD;

import java.util.LinkedList;

/**
 * Description: List集合 LinkedList
 * Author: A
 * Date: 2025/2/26
 * Time: 15:25
 */
public class LinkedListD {
    public static void main(String[] args) {
//        LinkedList 底层链表结构 增删快 查询慢
        LinkedList linkedList = new LinkedList();

        linkedList.add("任务1");
        linkedList.add("任务2");
        linkedList.add("任务3");

        System.out.println("出队: " + linkedList.remove());
        System.out.println("出队: " + linkedList.remove());
        System.out.println("当前队列" +linkedList );


        LinkedList<String> list = new LinkedList<>();
        list.add("元素1");
        list.add("元素2");
        list.add("元素3");
        list.add("元素4");
    }
}
